package com.yneusoft.manage.model.param;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 用户登录 参数类
 */
@Data
public class UserLoginParam {


    /**
     * 手机号
     */
    @NotNull(message = "电话号码不能为空")
    @Pattern(regexp = "^\\d{11}$",message = "手机格式错误")
    private String phone;


    /**
     * 登录密码
     */
    @NotNull(message = "密码不能为空")
    @Pattern(regexp = "^(?=.*\\d)(?=.*[a-zA-Z]).{6,20}$",message = "密码格式错误")
    private String password;


    /**
     * 验证码密钥
     */
    @NotNull(message = "验证码密钥不能为空")
    private String imageCodeKey;


    /**
     * 验证码
     */
    @NotNull(message = "验证码不能为空")
    @Pattern(regexp = "^.{4}$",message = "验证码格式错误")
    private String imageCode;
}
